package la.bbs558.controller.admin;

import cn.dev33.satoken.annotation.SaCheckRole;
import la.bbs558.aop.valid.Check;
import la.bbs558.controller.base.Result;
import la.bbs558.entity.params.ReplySearchPage;
import la.bbs558.satoken.StpAdminUtil;
import la.bbs558.service.BbsReplyService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Shanks
 * @date: 2023/12/16 12:27
 * @desc:
 */
@RestController
@RequestMapping("/admin/reply")
@RequiredArgsConstructor
@SaCheckRole(value = { "admin" },type = StpAdminUtil.TYPE)
@Check
public class BbsReplyManageController {

    private final BbsReplyService BbsReplyService;

    @GetMapping("list")
    public Result<?> list(ReplySearchPage searchPage) {
        BbsReplyService.listByPageForAdmin(searchPage);
        return Result.success(searchPage);
    }
}
